Skip to content

Fix/cd snupkg glob#107

Open
kieronlanning wants to merge 2 commits into
mainfrom
fix/cd-snupkg-glob
Open

Fix/cd snupkg glob#107
kieronlanning wants to merge 2 commits into
mainfrom
fix/cd-snupkg-glob

Conversation

@kieronlanning

Copy link
Copy Markdown
Contributor

No description provided.

kieronlanning and others added 2 commits May 24, 2026 17:40
- dotnet pack without SymbolPackageFormat=snupkg produces .symbols.nupkg, not .snupkg
- Use nullglob so the release create doesn't fail if a glob matches nothing

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 25, 2026 09:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR makes the CD release asset upload more robust by safely collecting NuGet package artifacts before calling gh release create, and adds local act workflow-testing scaffolding.

Changes:

  • Uses nullglob and arrays to avoid passing unmatched .nupkg / .snupkg globs to gh release create.
  • Fails release creation when no .nupkg assets are found and warns when symbols are missing.
  • Adds local act config plus ignored secret/env files and a secrets template.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.

File Description
.github/workflows/cd.yml Safely collects NuGet release assets before creating the GitHub Release.
.actrc Adds default act options for local workflow execution.
.secrets.template Provides a template for local act secrets.
.gitignore Ignores local act secret and environment files.

Comment thread .github/workflows/cd.yml
Comment on lines +146 to +157
shopt -s nullglob
PACKAGES=( ./artifacts/nuget/*.nupkg )
SYMBOLS=( ./artifacts/nuget/*.snupkg )
shopt -u nullglob

if (( ${#PACKAGES[@]} == 0 )); then
echo "::error::No .nupkg package assets found in ./artifacts/nuget."
exit 1
fi

if (( ${#SYMBOLS[@]} == 0 )); then
echo "::warning::No .snupkg symbol assets found in ./artifacts/nuget."
Comment thread .actrc
Comment on lines +9 to +11

# Load env vars for act-specific overrides
--env-file .env.act
Comment thread .secrets.template
@@ -0,0 +1,3 @@
# Template — copy to .secrets (gitignored) and fill in values.
# Used by act for local workflow testing.
GITHUB_TOKEN=<your-pat-with-contents:write-and-packages:write>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants